from building import *
import os

cwd = GetCurrentDir()
src = Glob('*.c')
CPPPATH = [cwd]  # 初始化头文件搜索路径

# 定义主应用程序组
group = DefineGroup(
    name='Applications',
    src=src, 
    depend=[''], 
    CPPPATH=CPPPATH
)

# 递归处理子目录的SConscript
list = os.listdir(cwd)
for item in list:
    if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
        group = group + SConscript(os.path.join(item, 'SConscript'))
        
Return('group')